package top.yudoge.dogeeditorserverj.llm;

import cn.hutool.extra.spring.SpringUtil;
import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.community.model.dashscope.QwenStreamingChatModel;
import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.chat.StreamingChatLanguageModel;
import org.springframework.web.context.support.WebApplicationContextUtils;

public class LLMFactory {

    public static StreamingChatLanguageModel getStreamingModel(String modelName) {
        StreamingChatLanguageModel bean = SpringUtil.getBean(QwenStreamingChatModel.class);
        return bean;
    }

    /**
     *
     * @param modelName
     * @return
     */
    public static ChatLanguageModel getReasonModel(String modelName) {
        ChatLanguageModel bean = SpringUtil.getBean(QwenChatModel.class);
        return bean;
    }
}
